package com.listen.playanddown;

import com.listen.playanddown.bean.MusicBean;
import com.wgl.android.library.baseapp.BaseApplication;
import com.wgl.android.library.commonutils.LogUtils;

import java.util.List;

/**
 * Created by Administrator on 2017/11/13.
 */
public class Application extends BaseApplication {
    //得到Application
    public static Application getInstance() {
        return instance;
    }

    public static Application instance;

    //得到当前在播放的List数据
    private static List<MusicBean.MsgEntity.DataEntity> data;

    public static void setData(List<MusicBean.MsgEntity.DataEntity> data) {
        Application.data = data;
    }

    public static List<MusicBean.MsgEntity.DataEntity> getData() {
        return data;
    }

    //得到当前正在播放的position，
    private static int playPosition = -1;

    public static int getPlayPosition() {
        return playPosition;
    }

    public static void setPlayPosition(int playPosition) {
        Application.playPosition = playPosition;
    }


    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        LogUtils.logInit(true);
    }


}
